package com.ruoyi.common.enums;

/**
 * 领导类型
 * 
 * @author wk
 */
public enum LeaderType
{
    DepartmentPrincipal("1","部门领导正职"),
    DepartmentDeputy("2","部门领导副职"),
    DepartmentOther("3", "与部门领导同级别的其他领导"),
    InternalPrincipal("4","内设机构领导正职"),
    InternalDeputy("5","内设机构领导副职"),
    InternalOther("6", "与内设机构领导同级别的其他领导"),
    ;

    private final String code;
    private final String info;

    LeaderType(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static LeaderType leaderTypeOf(String info) {
        for(LeaderType leaderType : values()){
            if(leaderType.getInfo().equals(info)){
                return leaderType;
            }
        }
        return null;
    }
}
